package com.xmq.utils.error;

import com.xmq.utils.respenum.RespEnum;

public class BaseException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private int code;
    private String msg;
    public BaseException(RespEnum respEnum) {
        super(respEnum.getMsg());
        this.code = respEnum.getCode();
        this.msg = respEnum.getMsg();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
